package hibernate.xml21;

import org.hibernate.Session;
import org.hibernate.Transaction;

public class InitData {
	
	public static void main(String[] args){
		
		Session session = null;
		Transaction tx = null;
		try {
			session = HibernateUtil.getSession();
			tx = session.beginTransaction();
			Group group =new Group();
			group.setName("A13-1");
			session.save(group);
			tx.commit();
		} catch (Exception e) {
			e.printStackTrace();
			tx.rollback();
		} finally {
			HibernateUtil.closeSession(session);
		}
	}
}
